package com.boliq.lol.adapter;


import com.boliq.lol.R;
import com.boliq.lol.bean.NewsArticleBean;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;


public class NewsArticleAdapter extends BaseQuickAdapter<NewsArticleBean, BaseViewHolder> {

    public NewsArticleAdapter() {
        super(R.layout.item_news_article);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, NewsArticleBean newsArticleBean) {

        baseViewHolder.setText(R.id.tv_article_title,newsArticleBean.getTitle());
        baseViewHolder.setImageResource(R.id.img_cover,newsArticleBean.getImag());
        baseViewHolder.setText(R.id.tv_tag,newsArticleBean.getTag());
        baseViewHolder.setText(R.id.tv_article_user,newsArticleBean.getUser());
        baseViewHolder.setText(R.id.tv_view_number,newsArticleBean.getHot());
    }
}
